<template>
  <j-modal :title="title" :width="width" :visible="visible" switchFullscreen   @ok="handleOk"  @cancel="handleCancel">
    <ene-outbound-form
      :type="title"
      ref="purchasing"
      @cancel="handleCancel"
      :disabled="disableSubmit"
    ></ene-outbound-form>
  </j-modal>
</template>
<script>
import EneOutboundForm from "@views/warehouse/modules/EneOutboundForm";

export default {
  name: "EneOutboundModal",
  components: {
    EneOutboundForm
  },
  data() {
    return {
      title: '',
      width: 1200,
      visible: false,
      disableSubmit: false
    }
  },
  methods:{
    check(record) {
      this.visible = true
      this.$nextTick(() => {
        this.$refs.purchasing.check(record)
      })
    },
    close(){
      this.$emit('close')
      this.visible = false
    },
    handleCancel(){
      this.close()
    },
    handleOk() {

      this.$refs.purchasing.submitForm()
    },

  }
}
</script>

<style scoped>

</style>